#input from user
def calculator
puts "type first number"
fist_number = gets.to_i

puts "type second number"
second_number = gets.to_i

puts "type 1 to add, 2 to subtract, 3 to multiply or 4 to divide"
operator = gets.to_i
if operator==1
a+b

elseif operator==2
a-b
elseif operator==3
a*b
elseif operator==4
a/b
end
end

